package cn.sciento.websocket.helper;

import cn.sciento.core.oauth.CustomUserDetails;
import cn.sciento.websocket.vo.MsgVO;

public abstract class SocketMessageHandler {
    private ThreadLocal<CustomUserDetails> customUserDetails = new ThreadLocal<>();

    public abstract void processMessage(MsgVO paramMsgVO);

    public boolean needPrincipal() {
        return false;
    }

    public CustomUserDetails getCustomUserDetails() {
        return this.customUserDetails.get();
    }

    public void setCustomUserDetails(CustomUserDetails customUserDetails) {
        this.customUserDetails.set(customUserDetails);
    }
}
